home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Your Choice 3
/
Your Choice Software Collection 3.iso
/
os2_drv
/
thinkpad
/
win_inst.cmd
< prev
Wrap
OS/2 REXX Batch file
|
1994-09-29
|
3KB
|
114 lines
/**/
'@echo off'
call rxfuncadd sysloadfuncs,rexxutil,sysloadfuncs
call sysloadfuncs
arg windir os2drive
if (compare(windir,"")=0) | (compare(os2drive,"")=0) then
do
say
say "usage: WIN_INST.CMD WINDIR OS2DRIVE"
say
say "where WINDIR is the Windows / WINOS/2 Directory"
say "and OS2DRIVE is the Drive on which OS/2 is installed."
return
end
call sysfiletree windir,winlist
errors=0
if winlist.0=0 then
DO
say 'Error: 'windir' is an invalid Windows Directory'
errors=1
END
os2dir=left(os2drive,1)':\OS2\MDOS\'
call sysfiletree os2dir,os2list
if os2list.0=0 then
DO
say 'Error: 'os2drive' is an invalid OS2 Drive'
errors=1
END
if compare(right(windir,1),'\')<>0 then
windir=windir'\'
if errors=0 then
DO
call sysfiletree 'cs31ba11.ini',csfile
if csfile.0=0 then
DO
say 'Error: file CS31BA11.INI was not found'
errors=1
END
call sysfiletree 'cs31ba11.drv',csfile
if csfile.0=0 then
DO
say 'Error: file CS31BA11.DRV was not found'
errors=1
END
call sysfiletree 'tp750ini.add',csfile
if csfile.0=0 then
DO
say 'Error: file TP750INI.ADD was not found'
errors=1
END
call sysfiletree 'vsndsys.386',csfile
if csfile.0=0 then
DO
say 'Error: file VSNDSYS.386 was not found'
errors=1
END
call sysfiletree 'vdma.sys',csfile
if csfile.0=0 then
DO
say 'Error: file VDMA.SYS was not found'
errors=1
END
END
if errors>0 then
do
say
say "usage: WIN_INST.CMD WINDIR OS2DRIVE"
say
say "where WINDIR is the Windows / WINOS/2 Directory"
say "and OS2DRIVE is the Drive on which OS/2 is installed."
return
end
copy 'CS31BA11.INI' windir' > NUL'
copy 'CS31BA11.DRV' windir'system > NUL'
copy 'VSNDSYS.386' windir'system > NUL'
copy 'VDMA.SYS' os2dir' > NUL'
copy windir'system.ini' windir'system.bak > NUL'
attrib '-r 'windir'system.ini'
erase windir'system.ini'
line=linein(windir'system.bak',1,0)
mode=0
do while lines(windir'system.bak')<>0
cline=linein(windir'system.bak')
call lineout windir'system.ini',cline
push cline
parse upper pull cl
if compare('[DRIVERS]',left(cl,9))=0 then
do
call lineout windir'system.ini','Wave=CS31BA11.DRV'
call lineout windir'system.ini','Aux=CS31BA11.DRV'
call lineout windir'system.ini','Mixer=CS31BA11.DRV'
end
if compare('[386ENH]',left(cl,8))=0 then
call lineout windir'system.ini','Device=vsndsys.386'
end
/* call lineout windir'system.ini' */
call lineout windir'system.ini',''
call lineout windir'system.ini',';The Following lines have been added from TP750INI.ADD'
call lineout windir'system.ini'
copy windir'system.ini+TP750INI.ADD' windir'system.ini > NUL'
say
say "WINDOWS has been updated successfully."
say "SYSTEM.INI has been modified, a backup can be found in SYSTEM.BAK"
say "The system needs to be rebooted for changes to take effect."